-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local Jupyter Code Executor for Version 4 #4795
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
python/packages/autogen-ext/src/autogen_ext/code_executors/jupyter/_jupyter_code_executor.py
Outdated
Show resolved
Hide resolved
@jackgerrits @ekzhu PR is now ready for review.
|
@Leon0402 thanks for the PR. There is a possibility that we may get to this after the 0.4.0 release. Please let us know if this is something you need urgently. |
Yes, it is something I need quite urgently. But I am okay with working with my fork until it is released and I obviously understand that your availability is limited over the Christmas period. |
f53e14a
to
4ac263d
Compare
Redesigned a little bit and added more tests, should be in a good state now. @ekzhu One thing I wonder is how autogen previously dealt with images. I currently modified the code such that the result is that output contains something like this "<PIL.Image.Image image mode=RGB size=100x100>" and there is an array of file path containing the path to the actual image. Previously the output also contained something like "Image saved to path ...", but I felt that this was always redundant (in my applications I filtered that usually). As far as I understood my application code (not written originally by me) in Autogen V2 it would postprocess the output to:
Then https://github.com/microsoft/autogen/blob/v0.2.40/autogen/agentchat/contrib/img_utils.py#L166 would parse this automatically such that the image is included in the prompt / chat history. I wonder if we should adjust the code here that it produces image tags directly? Possibly even base64 encoded directly. Because right now all images are saved in the working directory. I don't think this is really necessary. Thus my proposal is to store image tags with base64 uri directly. Any thoughts? |
96bb175
to
661d670
Compare
Why are these changes needed?
The new v4 version has no support for jupter notebooks yet compared to the old version.
NOTE: This is still a draft and largely untested. But some early feedback is appreciated :)
Related issue number
Closes #4792
Checks